﻿<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" AutoEventWireup="true"
    CodeFile="MemberProductList.aspx.cs" Inherits="Member_Trade_MemberProductList"
    Title="管理我加入的产品库" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="Server">
<script type="text/javascript" src="../../js/jquery.js"></script>
    <script type="text/javascript">
    
         function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
    </script>
<div class="inkg mar_top">
           <strong class="inkgt">产品管理</strong>
			<div class="intip mar_top">
				<strong class="intipt">提&nbsp;示：</strong>
				<p>·修改信息：审核通过才能上网，可以增加商机有效期及提升信息排名。</p>
				<p>·过期信息：建议您重发有用的过期信息，信息过期6个月后将被系统自动删除！批量重发过期信息</p>
<i class="lt"></i><i class="lb"></i>
			</div>
			<div class="intab mar_top" id="intab">
                <ul id="menu">
                <li id="menu5" class="<%=verify=="0"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='MemberProductList.aspx?V=0'">所有信息</li>
				<li id="menu1" class="<%=verify=="1"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='MemberProductList.aspx?V=1'">产品已审核</li>
				<li id="menu2" class="<%=verify=="2"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='MemberProductList.aspx?V=2'">产品未审核</li>
				<li id="menu3" class="<%=verify=="3"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='MemberProductList.aspx?V=3'">请求靠前</li>
				<li id="menu4" class="<%=verify=="4"?"intabt2":"intabt1" %>" onclick="javascript:window.location.href='MemberProductList.aspx?V=4'">已请求靠前</li>
				</ul>
        <div class="intabc" id="intabc">
            <div class="con" style="display: block">
                                    <table cellpadding="0" cellspacing="0" border="0" class="edtb">
                            <thead>
                                <tr>
                                    <td id="xh" align="center" width="40">
                                        <strong>选项</strong>
                                    </td>
                                    <td align="center" width="80">
                                        <strong>公司名称</strong>
                                    </td>
                                    <td align="center" width="150">
                                        <strong>产品名称</strong>
                                    </td>
                                    <td align="center" width="55">
                                        <strong>是否靠前</strong>
                                    </td>
                                    <td align="center" width="55">
                                        <strong>有效期至</strong>
                                    </td>
                                    <td align="center" width="55">
                                        <strong>申请日期</strong>
                                    </td>
                                    <td align="center" width="55">
                                        <strong>产品审核</strong>
                                    </td>
                                    <td align="center" >
                                        <strong>操作</strong>
                                    </td>
                                </tr>
                            </thead>
                            <tbody>
                              <asp:Repeater  ID="gvProducts" runat="server"  > 
                    <ItemTemplate>
                        <tr>
                            <td width="40" align="center">
                                <input runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ID")%>' id="chk" name="chk"
                                    type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                            </td>
                            <td width="80" align="center">
                               <%# DataBinder.Eval(Container.DataItem,"CompanyName") %>
                            </td>
                            <td width="150" align="center">
                            <%# DataBinder.Eval(Container.DataItem,"Name")%>
                            </td>
                            <td align="center" width="55">
                                <%# DataBinder.Eval(Container.DataItem, "IsTop").ToString()== "True" ? "是" : "否"%>
                            </td>
                          <%--  <td align="center" width="50">
                                <%# DataBinder.Eval(Container.DataItem, "Ask")%>
                            </td>--%>
                            <td align="center" width="55" >
                                <%# GetShortDate(Eval("LastDate").ToString()) %>
                            </td>
                            <td align="center" width="55" >
                                <%# GetShortDate(Eval("AddDate").ToString()) %>
                            </td>
                            <td align="center" width="55" >
                                <%#  ShowVerify(Eval("Verify").ToString())  %>
                            </td>
                            <td align="center" >
                        <a href='MemberProductEdit.aspx?productID=<%# DataBinder.Eval(Container.DataItem,"ID")%>'>编辑</a> |
                        <asp:LinkButton ID="lbtnDelete" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")%>'
                            Font-Underline="false" Text="删除" OnCommand="lbtnDelete_Command" OnClientClick="return confirm('你确定要删除吗?')"></asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater >
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="9">
                                    <p class="zi1">
                                                     <input runat="server" class="checkbox" type="checkbox" id="chkall" name="chkall" onclick="CheckMinoAll();" />
                                        全选
            <asp:Button ID="btnDelete" runat="server" CssClass="del" Text="批量删除" OnClientClick="return CheckSelect();return confirm('你确定要删除吗？')" OnClick="btnDelete_Click" />
            <asp:Label ID="lblMessage" runat="server" Visible="false"></asp:Label>
                                    </p>
                                    <p class="zi2">
                                       <uc1:PageNo ID="PageNo1" runat="server" />
                                    </p>
                                </td>
                            </tr>
                        </tfoot>
                        </table>
                         <input type="hidden" id="CheckedIDS" name="CheckedIDS" value="0" runat="server" />
        <%--<asp:GridView ID="gvProducts" runat="server" CssClass="table_main" CellPadding="0"
            GridLines="None" AutoGenerateColumns="False" DataKeyNames="ID" OnRowDataBound="gvProducts_RowDataBound">
            <Columns>
                <asp:TemplateField HeaderText="选项">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" />
                    </ItemTemplate>
                    <HeaderStyle CssClass="th20 tou" />
                    <ItemStyle CssClass="nolet" />
                </asp:TemplateField>
                <asp:TemplateField Visible="False">
                    <ItemTemplate>
                        <asp:Label ID="lblId" runat="server" Text='<%# Eval("ID") %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="公司名称">
                    <ItemTemplate>
                        <%# Eval("CompanyName") %>
                    </ItemTemplate>
                    <ItemStyle CssClass="left2" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="产品名称">
                    <ItemTemplate>
                        <%# Eval("Name") %>
                    </ItemTemplate>
                    <ItemStyle CssClass="th80" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="是否靠前">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "IsTop").ToString()== "True" ? "是" : "否"%>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="要求">
                    <ItemTemplate>
                        <%# Eval("Ask") %>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="有效期至">
                    <ItemTemplate>
                        <asp:Label ID="Label9" runat="server" Text='<%# GetShortDate(Eval("LastDate").ToString()) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="申请日期">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# GetShortDate(Eval("AddDate").ToString()) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="产品审核">
                    <ItemTemplate>
                        <span>
                            <%#  ShowVerify(Eval("Verify").ToString())  %>
                        </span>
                    </ItemTemplate>
                    <ItemStyle CssClass="th30" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <a href='MemberProductEdit.aspx?productID=<%# Eval("ID") %>'>编辑</a> |
                        <asp:LinkButton ID="lbtnDelete" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")%>'
                            Font-Underline="false" Text="删除" OnCommand="lbtnDelete_Command" OnClientClick="return confirm('你确定要删除吗?')"></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle CssClass="th80" />
                </asp:TemplateField>
            </Columns>
            <HeaderStyle CssClass="header" />
        </asp:GridView>--%>
        </div>
            </div>
    </div>
	</div>
</asp:Content>